package com.xjgzinfo.usdp.service.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.Lob;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * A DTO for the {@link com.xjgzinfo.usdp.domain.BladeVisualConfig} entity.
 */
@ApiModel(description = "大屏页面配置 @author  jxw")
public class BladeVisualConfigDTO implements Serializable {

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /**
     * 可视化表主键
     */
    @NotNull
    @ApiModelProperty(value = "可视化表主键", required = true)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long visualId;

    /**
     * 配置json
     */

    @ApiModelProperty(value = "配置json", required = true)
    @Lob
    private String detail;

    /**
     * 组件json
     */

    @ApiModelProperty(value = "组件json", required = true)
    @Lob
    private String component;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getVisualId() {
        return visualId;
    }

    public void setVisualId(Long visualId) {
        this.visualId = visualId;
    }


    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public String getComponent() {
        return component;
    }

    public void setComponent(String component) {
        this.component = component;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof BladeVisualConfigDTO)) {
            return false;
        }

        return id != null && id.equals(((BladeVisualConfigDTO) o).id);
    }

    @Override
    public int hashCode() {
        return 31;
    }

    @Override
    public String toString() {
        return "BladeVisualConfigDTO{" +
                "id=" + id +
                ", visualId=" + visualId +
                ", detail='" + detail + '\'' +
                ", component='" + component + '\'' +
                '}';
    }
}
